import { http } from '@/utils'

export const getOnGuardRecordsApi = (query?: any) =>
  http.get({
    url: '/on_duty_standby/get_duty_records',
    method: 'GET',
    query
  })

export const postOnGuarddApi = (data: any) => {
  return http.post({
    url: '/on_duty_standby/add_duty',
    method: 'POST',
    data
  })
}

// 确认值班信息
export const sureOnGuarApi = (data: any) =>
  http.put({
    url: '/on_duty_standby/confirm_duty',
    method: 'PUT',
    data
  })

//打卡
export const postClockInApi = (data?: any) =>
  http.post({
    url: '/on_duty_standby/sign_on',
    method: 'POST',
    data
  })

// 打卡记录
export const getClockInRecordsApi = (query?: any) =>
  http.get({
    url: '/on_duty_standby/get_sign_on_records',
    method: 'GET',
    query
  })

// 获取人员在岗记录
export const getPersonStatusRecordsApi = (query?: any) =>
  http.get({
    url: '/on_duty_standby/get_person_on_duty_records',
    method: 'GET',
    query
  })

// 获取假期记录
export const getHolidaysRecordsApi = (query?: any) =>
  http.get({
    url: '/internal_affairs_manage/get_holidays_records',
    method: 'GET',
    query
  })

// 发起请假申请
export const postHolidaysApi = (data: any) =>
  http.post({
    url: '/internal_affairs_manage/add_holidays',
    method: 'POST',
    data
  })

//审批假期
export const putHolidaysApi = (data: any) =>
  http.put({
    url: '/internal_affairs_manage/put_holidays',
    method: 'PUT',
    data
  })

// 获取采购记录
export const getPurchaseRecordsApi = (query?: any) =>
  http.get({
    url: '/internal_affairs_manage/get_purchase_records',
    method: 'GET',
    query
  })

// 发起采购申请
export const postPurchaseApi = (data: any) =>
  http.post({
    url: '/internal_affairs_manage/add_purchase',
    method: 'POST',
    data
  })

//审批采购
export const putPurchaseApi = (data: any) =>
  http.put({
    url: '/internal_affairs_manage/put_purchase',
    method: 'PUT',
    data
  })

// 获取涉案记录
export const getCaseRecordsApi = (query?: any) =>
  http.get({
    url: '/internal_affairs_manage/get_cases_records',
    method: 'GET',
    query
  })

// 获取涉案物品
export const getCasePropRecordsApi = (query?: any) =>
  http.get({
    url: '/internal_affairs_manage/get_casesprop_records',
    method: 'GET',
    query
  })

// 新增涉案物品
export const postCasePropApi = (data?: any) =>
  http.post({
    url: '/internal_affairs_manage/post_casesprop',
    method: 'POST',
    data
  })
